﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;

namespace SenseUtil
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main(string[] args)
        {
            //Determine entry into sense util
            if ((args == null)||(args.Length<1))
            {
                //No arguments, run app normally
                Application.Run(new SenseUtil());

            }
            else if(  String.Equals(args[0], "renew")
                    || String.Equals(args[0], "addall")
                    || String.Equals(args[0], "addallnew"))
            {
                //Renew tab data
                Application.Run(new SenseUtil(args[0]));
            }
            else if ((String.Equals(args[0], "add"))&&(args[1]!=null))
            {
                //Add tab data from specified file
                Application.Run(new SenseUtil(args[0],args[1]));
            }
            else if ((String.Equals(args[0], "remove")) && (args[1] != null))
            {
                //Add tab data from specified file
                Application.Run(new SenseUtil(args[0], args[1]));
            }
            else
            {
                //Not recognised arg, run app normally
                Application.Run(new SenseUtil());
            }
        }
    }
}